import './App.css';
import {BrowserRouter, useLocation  } from 'react-router-dom'
import RouterList from './routers/index';
import React from 'react'
import Tab from './components/common/tabbar'

function Breadcrumb() {
  // 获取路由地址
  const location = useLocation();
  var showTabs = true
  if(location.pathname == '/' || location.pathname == '/user/base/index' || location.pathname == '/contact/contact/index'){
    showTabs = true;
  } else{
    showTabs = false;
  }
  return (<div>{showTabs ?  <Tab /> : ''}</div>);
}

class App extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <RouterList/>
        <Breadcrumb/>
      </BrowserRouter>
    );
  }
    
}

export default App;